<div *ngIf="apesTitle"
     class="apes-descriptions-title">
  <ng-container *apesStringTemplateOutlet="apesTitle">{{ apesTitle }}</ng-container>
</div>
<div class="apes-descriptions-view">
  <table>
    <tbody>
    <tr class="apes-descriptions-row"
        *ngFor="let row of itemMatrix; let i = index">
      <ng-container *ngFor="let item of row; let isLast = last">
        <ng-container *ngIf="!apesBordered">
          <td class="apes-descriptions-item"
              [colSpan]="isLast ? (realColumn - (row.length - 1)) * 2 - 1 : item.span">
            <ng-container *ngIf="item.title != null">
              <span class="apes-descriptions-item-label">{{ item.title }}</span>
            </ng-container>
            <span class="apes-descriptions-item-content">
              <ng-template [ngTemplateOutlet]="item.content"></ng-template>
            </span>
          </td>
        </ng-container>
        <ng-container *ngIf="apesBordered">
          <td class="apes-descriptions-item-label"
              *apesStringTemplateOutlet="item.title">{{ item.title }}</td>
          <td class="apes-descriptions-item-content"
              [colSpan]="isLast ? (realColumn - (row.length - 1)) * 2 - 1 : item.span">
            <ng-template [ngTemplateOutlet]="item.content"></ng-template>
          </td>
        </ng-container>
      </ng-container>
    </tr>
    </tbody>

  </table>
</div>
